/** +----------------------------------------------------------------------
 * | DSSHOP [ 轻量级易扩展低代码开源商城系统 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2020~2023 https://www.dswjcms.com All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed 未经许可不能去掉DSSHOP相关版权
 * +----------------------------------------------------------------------
 * | Author: Purl <383354826@qq.com>
 * +----------------------------------------------------------------------
 */
import request from '@/utils/request'
import Qs from 'qs'
export function getGoodList(query) {
  return request({
    url: 'goodrlist',
    method: 'GET',
    params: query
  })
}

export function getIndentList(query) {
  return request({
    url: 'indentrlist',
    method: 'GET',
    params: query
  })
}
export function getMebList(query) {
  return request({
    url: 'memberrlist',
    method: 'GET',
    params: query
  })
}

// export function create(data) {
//   data = Qs.parse(data)
//   return request({
//     url: 'region',
//     method: 'POST',
//     data
//   })
// }

export function goodRestore(data) {
  data = Qs.parse(data)
  return request({
    url: 'good/restore/' + data.id,
    method: 'POST',
    data
  })
}

export function IndentRestore(data) {
  data = Qs.parse(data)
  return request({
    url: 'indent/restore/' + data.id,
    method: 'POST',
    data
  })
}

export function MebRestore(data) {
  data = Qs.parse(data)
  return request({
    url: 'member/restore/' + data.id,
    method: 'POST',
    data
  })
}

// delete
export function goodDelete(data) {
  data = Qs.parse(data)
  return request({
    url: 'good/delete/' + data.id,
    method: 'POST',
    data
  })
}

export function IndentDelete(data) {
  data = Qs.parse(data)
  return request({
    url: 'indent/delete/' + data.id,
    method: 'POST',
    data
  })
}

export function MebDelete(data) {
  data = Qs.parse(data)
  return request({
    url: 'member/delete/' + data.id,
    method: 'POST',
    data
  })
}

export function goodAdelete(id, data) {
  data = Qs.parse(data)
  return request({
    url: 'good/delete/' + id,
    method: 'POST',
    data
  })
}

export function mebAdelete(id, data) {
  data = Qs.parse(data)
  return request({
    url: 'member/delete/' + id,
    method: 'POST',
    data
  })
}

export function IndentAdelete(id, data) {
  data = Qs.parse(data)
  return request({
    url: 'indent/delete/' + id,
    method: 'POST',
    data
  })
}
